Otherwise, things like ICC profiles as read from the colr box meant for an item
with no stream (like a grid) may end up being added to the wrong stream.
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit
04182b55494b44152146e6a6bcd5eb9403f00625)
Gbp-Pq: Name 0001-avformat-mov-don-t-return-the-latest-stream-when-an-.patch
return p - dst;
}
+/**
+ * Get the current stream in the parsing process. This can either be the
+ * latest stream added to the context, or the stream referenced by an item.
+ */
static AVStream *get_curr_st(MOVContext *c)
{
AVStream *st = NULL;
st = item->st;
break;
}
- if (!st)
+ if (!st && c->cur_item_id == -1)
st = c->fc->streams[c->fc->nb_streams-1];
return st;